package com.tianjipms.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tianjipms.entity.Vehicle;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface VehicleMapper extends BaseMapper<Vehicle> {

    @Select("select * from sys_vehicl where license_number = #{licenseNumber};")
    Vehicle vehiclByLicenseNumber(String licenseNumber);
    @Select("select COUNT(*) from sys_vehicl where license_number = #{licenseNumber};")
    int countByLicenseNumber(String licenseNumber);
    @Select("select COUNT(*) from sys_vehicl where is_vip = #{isVip};")
    Integer countByIsVip(Integer isVip);
    @Select("select COUNT(*) from sys_vehicl where is_vip = 1 and license_number is null;")
    Integer countIsUserByVip();
    @Select("select * from sys_vehicl where is_vip = 1 and license_number is null;")
    List<Vehicle> findIsUserByVip();
}
